from pms.common.views import PostFormula
from department.models import Work
from department.utils.member import department_member_view


class API(PostFormula):

    def handle(self, req):
        return self.success_respond(
            department_member_view(
                Work.objects.get(
                    uid_id=req['uid'],
                    rid__did_id=req['did']
                )
            )
        )
